package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbContactWay entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_CONTACT_WAY", schema = "dbo", catalog = "AGDB")
public class TbContactWay implements java.io.Serializable {

	// Fields

	private String ctwId;
	private String ctwName;
	private String a;
	private String b;
	private String c;
	private Set<TbContactLog> tbContactLogs = new HashSet<TbContactLog>(0);

	// Constructors

	/** default constructor */
	public TbContactWay() {
	}

	/** minimal constructor */
	public TbContactWay(String ctwId, String ctwName) {
		this.ctwId = ctwId;
		this.ctwName = ctwName;
	}

	/** full constructor */
	public TbContactWay(String ctwId, String ctwName, String a, String b,
			String c, Set<TbContactLog> tbContactLogs) {
		this.ctwId = ctwId;
		this.ctwName = ctwName;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbContactLogs = tbContactLogs;
	}

	// Property accessors
	@Id
	@Column(name = "CTW_ID", unique = true, nullable = false, length = 4)
	public String getCtwId() {
		return this.ctwId;
	}

	public void setCtwId(String ctwId) {
		this.ctwId = ctwId;
	}

	@Column(name = "CTW_NAME", nullable = false, length = 20)
	public String getCtwName() {
		return this.ctwName;
	}

	public void setCtwName(String ctwName) {
		this.ctwName = ctwName;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbContactWay")
	public Set<TbContactLog> getTbContactLogs() {
		return this.tbContactLogs;
	}

	public void setTbContactLogs(Set<TbContactLog> tbContactLogs) {
		this.tbContactLogs = tbContactLogs;
	}

}